// import React, { useState } from 'react'
import { Form, Input } from 'antd-mobile'
import { Link } from "react-router-dom"
// import { DemoBlock } from 'demos'
import "./home.scss"
function Home() {
  function aaa() {
    if (false) {
      return <Link to={"/goods"}>选择产品</Link>
    } else {
      return <Link to={"/goods"}>
        <ul>
          {[{ "name": "奇妙" }, { "name": "奇妙2" }, { "name": "奇妙3" }].map(item => {
            return <li>{item.name}</li>
          })}
        </ul>
      </Link>
    }
  }
  return (
    <div className='home'>

      <Form layout='horizontal' mode='card'>
        <Form.Header>请录入你的信息</Form.Header>
        <Form.Item label='销售金额'>
          <Input placeholder='请输入订单金额' />
        </Form.Item>
        <Form.Item label='客户姓名'>
          <Input placeholder='请输入客户姓名' />
        </Form.Item>
        <Form.Item label='客户电话'>
          <Input placeholder='请输入客户电话' />
        </Form.Item>
        <Form.Header>请选择销售的产品</Form.Header>
        <div>{aaa()}</div>
        <Form.Header>请上传发票凭证</Form.Header>
        <span>1</span>
      </Form>

    </div>
  )
}
export default Home